1. Technical Field
The present invention relates in general to data processing and, in particular, to cache memory in a data processing system. Still more particularly, the present invention relates to a set associative cache in a data processing system that stores information in particular sets according to information type.
2. Description of the Related Art
A cache is a small amount of expensive high-speed memory, which is commonly utilized within a data processing system to improve a processor""s access time to data stored within an associated memory, thereby decreasing access latency. A cache typically comprises a number of cache lines, which each include several bytes of data. Data stored within memory is mapped into a cache utilizing an index portion of the memory addresses associated with the data, such that multiple memory addresses having the same index portion map to the same cache line. Cached data associated with a particular memory address are distinguished from data associated with other addresses having the same index portion by an address tag, typically the high order address bits, which is stored in association with the cached data. In order to minimize the conflict between data associated with addresses having identical index portions, many data processing system caches are implemented as set associative caches, which include a number of congruence classes that each contain multiple sets (storage locations) for storing cache lines.
When data requested by the processor does not reside within a set associative cache, a cache miss occurs, and the requested data are fetched from a lower level cache or memory. In order to accommodate the requested data within the cache, data resident within one of the sets of the congruence class to which the requested data maps often must be replaced or xe2x80x9ccast out.xe2x80x9d The replaced set is typically selected utilizing a single predetermined victim selection algorithm, such as a least recently used (LRU) or most recently used (MRU) algorithm, that is believed, on average, to retain in the cache data having the highest probability of being requested by the processor.
The present invention recognizes that a significant drawback of conventional cache architectures is that they apply uniform allocation and victim selection policies (and other cache policies) to all types of data regardless of the persistence (or other characteristics) of the data. For example, while an LRU victim selection algorithm may be optimal for application data, other types of data stored within the same congruence class, for example, program instructions or address translation table entries, may have differing persistence and may therefore be more efficiently managed utilizing a different victim selection policy.
The present invention addresses the above-noted shortcomings of prior art cache architectures by introducing a set associative cache that implements data type-dependent policies, and in particular, data-dependent allocation and victim selection policies.
A set associative cache in accordance with the present invention includes a cache controller, a directory, and an array including at least one congruence class containing a plurality of sets. The plurality of sets are partitioned into multiple groups according to which of a plurality of information types each set can store. The sets are partitioned so that at least two of the groups include the same set and at least one of the sets can store fewer than all of the information types. The cache controller then implements different cache policies for at least two of the plurality of groups, thus permitting the operation of the cache to be individually optimized for different information types.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.